package com.CST.service;

import com.CST.common.api.Response;
import com.CST.common.api.ResultObject;
import com.CST.entity.BdOrganization;
import com.CST.entity.BdOrganizationRule;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>科室部门对应</p>
 *
 * @author: y
 * @create: 2021-10-22 14:36
 **/
public interface IBdOrganizationService extends IService<BdOrganization> {

    /**
     * 获取组织架构数据
     * @param entity
     * @return
     */
    List<BdOrganization> getOrganizationSource(BdOrganization entity);

    List<BdOrganization> getOrganizationNormal(BdOrganization entity);

    List<BdOrganization> getNoRelationDepartmentList(BdOrganization entity);

    Boolean isHaveOrganization(BdOrganization entity);

    /**
     * 添加组织架构数据
     * @param entity
     * @return
     */
    Response addOrganization(BdOrganization entity);

    /**
     * 修改组织架构数据
     * @param entity
     * @return
     */
    Response modifyOrganization(BdOrganization entity);

    /**
     * 批量删除
     * @return
     */
    Response batchDeleteOrganization(List<Integer> ids);

    /**
     * 添加继承关系
     * @param entity
     * @return
     */
    Response addInheritanceRules(BdOrganizationRule entity);

    ResultObject listParentDeptGroup(String yard);

    /**
     * 获取所有临床类父级科室
     * @return
     */
    List<BdOrganization> listClinicalPDeptGroup();

    boolean deleteRule(Integer edId, String ruleCode);

    void exportExcel(HttpServletResponse response, BdOrganization dto) throws ClassNotFoundException;

}
